/*
 * @Date: 2019-08-31 14:38:45
 * @Github: https://github.com/FinnWu
 * @LastEditors: Finnwu
 * @LastEditTime: 2019-08-31 14:45:00
 */


 // 旋转数组中的最小值
function minNumberInRotateArray(rotateArray)
{
    // write code here

    for(var i = 1; i < rotateArray.length; i++) {
        if(rotateArray[i - 1] > rotateArray[i]) {
            return rotateArray[i]
        }
    }
}

console.log(minNumberInRotateArray([3,4,5,1,2]));

